package com.zhiche.lisa.bms.service.fee;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.bms.dao.model.fee.FeeAssessment;
import com.zhiche.lisa.bms.pojo.vo.fee.FeeAssessmentImportVO;
import com.zhiche.lisa.bms.pojo.vo.fee.FeeAssessmentVO;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 考核奖惩费用 服务类
 * </p>
 *
 * @author WangShuiJin
 * @since 2018-09-20
 */
public interface FeeAssessmentService extends IService<FeeAssessment> {
    /**
     * 查询考核奖惩费用列表
     *
     * @param page
     * @return
     */
    Page<FeeAssessment> queryFeeAssessmentPage(Page<FeeAssessment> page);

    /**
     * 查询考核奖惩费用列表
     *
     * @param condition
     * @return
     */
    List<FeeAssessmentImportVO> queryFeeAssessmentListByCondition(Map<String, Object> condition);

    /**
     * 根据支付申请ID，查询考核奖惩费用列表
     *
     * @param payId
     * @return
     */
    List<FeeAssessment> getFeeAssessmentByPayIdList(Long payId);

    /**
     * 根据承运人查询考核奖惩费用列表
     *
     * @param payeeId
     * @param billProperty
     * @return
     */
    List<FeeAssessment> getFeeAssessmentByFleetIdList(Long payeeId, Integer billProperty);

    /**
     * 获取考核单
     *
     * @param stringObjectMap
     * @return
     */
    List<FeeAssessment> getAvailableFeeAssessment(Map<String, Object> stringObjectMap);

    /**
     * 考核单挂起
     *
     * @param ids
     * @param token
     * @return
     */
    List<String> blockedFeeAssessment(List<Long> ids, String token);

    /**
     * 考核单发布
     *
     * @param feeAssessmentList
     */
    void publishFeeAssessment(List<FeeAssessment> feeAssessmentList);

    /**
     * 根据考核单号，删除考核奖惩费用
     *
     * @param assessCodeList
     */
    void deleteFeeAssessment(List<Long> assessCodeList);

    /**
     * 新增考核奖惩费用
     *
     * @param feeAssessmentList
     */
    void insertFeeAssessment(List<FeeAssessment> feeAssessmentList);

    /**
     * 根据code值获取对应的考核信息
     *
     * @param code
     * @return
     */
    List<FeeAssessment> selectFeeAssessmentListByCodes(List<String> code);

    /**
     * 根据多个id,获取考核信息
     *
     * @param ids
     * @return
     */
    List<FeeAssessment> getFeeAssessmentListByIds(List<Long> ids);

    /**
     * 根据应付账款ID和多个考核奖惩ID,得到考核奖惩信息
     *
     * @param feePayableId
     * @param ids
     * @return
     */
    List<Long> getFeeAssessmentSumByFeepIdAndIds(Long feePayableId, List<Long> ids);

    /**
     * 获取支付申请对应的考核单
     *
     * @param payId
     * @return
     */
    List<FeeAssessmentVO> getFeeAssessmentVoListByPayId(Long payId);

    /**
     * 根据code值获取对应的考核信息 - 无token
     *
     * @param code
     * @return
     */
    List<FeeAssessment> selectFeeAssessmentListByCodesNoTenant(Set<String> code);

    /**
     * 关闭考核单
     *
     * @param idList
     * @param reason
     */
    List<String> closeAssessment(List<Long> idList, String reason);
}
